IOT protocol
info
- All here listed messages are little-endian.
 - DLC of all messages is 8 bytes
 - Host - IOT device connecting to the controller
 - Controller - siliXcon controller with LYNX firmware
 
tip
- In most cases use host address = 7
 - controller  address is usually 0
- It is possible to use broadcast value as controller address - 255
 
 - If you have multiple controllers, each controller must have a unique address
 
Command request
CAN_ID = 0x630 + host address
| Byte | type | Description | 
|---|---|---|
| 0 | UINT_8 | controller addr, 255 = broadcast | 
| 0-3 bite operation code, 4-7 session id  | ||
| 2 | UINT_8 | Operation code index | 
| 3 | UINT_8 | Operation code subindex | 
| 4-7 | - | Data | 
Command response
CAN_ID = 0x640 + controller address
| Byte | type | Description | 
|---|---|---|
| 0 | UINT_8 | Host addr, 255 = broadcast | 
| 1 | - | Same as was in command request | 
| 2 | - | Same as was in command request | 
| 3 | UINT_8 | Message index (for bulk data), 255 = last message | 
| 4-7 | - | Data | 
Operation code
| Operation code | Description | 
|---|---|
| 1 | Read parameter | 
| 2 | Write parameter | 
| 3 | Load from backup parameter (restore) | 
| 3 | Read metadata | 
| 4 | Write metadata (reserved) | 
| 5 | Issue command | 
| 6 | Load parameters | 
Read / write / load from backup parameter
When you read a parameter, in the request msg, leave "data" null. When you set a parameter, in response is real/set value.
Message index = 255 -> parameter/map does not exist.
| Index | Parameter list description | 
|---|---|
| 0 - 10 | Map number | 
| 15 | Map options | 
| 16 | Gear opts | 
| 20 - 255 | Reserved for other parameters | 
| Sub-index for map list | Description | Data | 
|---|---|---|
| 1 | kph | Float | 
| 2 | pwr | Float | 
| 3 | trqlvl | Float | 
| 4 | accvlv | Float | 
| 5 | paslvl | Float | 
| 6 | pastrq | Float | 
| 7 | comlvl | Float | 
| 8 | sbrakelvl | Float | 
Index = 15
This param are READ ONLY, you can not change them using CAN message
| Sub-index for map options | Description | Data | 
|---|---|---|
| 1 | kphlimit | Float | 
| 2 | pwrlimit | Float | 
| 3 | restmapcnt | UINT8 | 
| 4 | mapcnt | UINT8 | 
Index = 16
| Sub-index for gear options | Description | Data | 
|---|---|---|
| 1 | gearthr | Float | 
| 2 | odothr | Float | 
Read / write metadata
When data are char, the subindex in response is incremented each msg. The last message is with subindex = 255.
| Index | Description | Data | 
|---|---|---|
| 1 | Usrcalib - DevName | Char | 
| 2 | Usrcalib - DevSN | Char | 
| 3 -12 | Usrcalib - DevIdX | INT_32 | 
| 20 | Device SN | 12x Char | 
| 21 | SWID | Char | 
| 22 | HWID | Char | 
| 30 | SWID hash | UINT32 | 
| 31 | Config hash | UINT16 | 
Issue command
| Index | Description | sub-index | Response Data | 
|---|---|---|---|
| 1 | lock device | 0 - success | |
| 2 | un-lock device | 0 - success | |
| 3 | Force map | Map number | 0 - success | 
| 4 | Reset trip counter | 0 - success | |
| 20 | Parameter save | 0 - succes, 1 - error | |
| 21 | Load parameters from main | 0 - success, 1 - error | |
| 22 | Load parameters from backup | 0 - success, 1 - error | |
| 50 | Execute identrun  mode must be STANDBY or BRAKE  | 0 - success |